﻿using System;
using System.Collections.Generic;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Identity;

namespace Volo.Abp.AuditLogging
{
    public class AuditLogDto : ExtensibleEntityDto<Guid>, IHasConcurrencyStamp
    {
        /// <summary>
        /// Http状态码
        /// </summary>
        public int? HttpStatusCode { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string Comments { get; set; }
        /// <summary>
        /// 异常信息
        /// </summary>
        public string Exceptions { get; set; }
        /// <summary>
        /// 请求地址
        /// </summary>
        public string Url { get; set; }
        /// <summary>
        /// Http方法
        /// </summary>
        public string HttpMethod { get; set; }
        /// <summary>
        /// 浏览器信息
        /// </summary>
        public string BrowserInfo { get; set; }
        /// <summary>
        /// 关联Id
        /// </summary>
        public string CorrelationId { get; set; }
        /// <summary>
        /// 客户端Id
        /// </summary>
        public string ClientId { get; set; }
        /// <summary>
        /// 客户端名称
        /// </summary>
        public string ClientName { get; set; }
        /// <summary>
        /// 客户端IP地址
        /// </summary>
        public string ClientIpAddress { get; set; }
        /// <summary>
        /// 耗时（毫秒）
        /// </summary>
        public int ExecutionDuration { get; set; }
        /// <summary>
        /// 请求时间
        /// </summary>
        public DateTime ExecutionTime { get; set; }
        public Guid? ImpersonatorTenantId { get; set; }
        public Guid? ImpersonatorUserId { get; set; }
        /// <summary>
        /// 租户名称
        /// </summary>
        public string TenantName { get; set; }
        /// <summary>
        /// 租户Id
        /// </summary>
        public Guid? TenantId { get; set; }
        /// <summary>
        /// 用户名称
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// 用户Id
        /// </summary>
        public Guid? UserId { get; set; }
        /// <summary>
        /// 应用名称
        /// </summary>
        public string ApplicationName { get; set; }
        public ICollection<EntityChangeDto> EntityChanges { get; set; }
        public ICollection<AuditLogActionDto> Actions { get; set; }
        public string ConcurrencyStamp { get; set; }
    }
}